﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@using Telerik.Web.Mvc.UI
@using CodeStash.ExtensionsMethods
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>@ViewBag.Title</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    @Html.CssTag(Url.Content("~/Content/openid-shadow.css"))
    @Html.CssTag(Url.Content("~/Content/openid.css"))
    @Html.CssTag(Url.Content("~/Content/themes/base/jquery-ui.css"))
    @Html.CssTag(Url.Content("~/Content/themes/base/jquery.ui.dialog.css"))
    @Html.CssTag(Url.Content("~/Content/Highlighting/jquery.snippet.css"))
    @Html.ScriptTag(Url.Content("~/Scripts/jquery-1.6.4.min.js"))
    @Html.ScriptTag(Url.Content("~/Scripts/modernizr-1.7.min.js"))
    @Html.ScriptTag(Url.Content("~/Scripts/jquery.tools.min.js"))
    @Html.ScriptTag(Url.Content("~/Scripts/jquery.tmpl.js"))
    @Html.ScriptTag(Url.Content("~/Scripts/openid-jquery.js"))
    @Html.ScriptTag(Url.Content("~/Scripts/openid-en.js"))
    @Html.ScriptTag(Url.Content("~/Scripts/jquery-ui-1.8.16.min.js"))
    @Html.ScriptTag(Url.Content("~/Scripts/Common/commonFunctions.js"))
    @Html.ScriptTag(Url.Content("~/Scripts/Rating/ratingsLogic.js"))
    @Html.ScriptTag(Url.Content("~/Scripts/Syntax/Scripts/shCore.js"))
    @Html.ScriptTag(Url.Content("~/Scripts/Syntax/Scripts/shAutoLoader.js"))
    @Html.CssTag(Url.Content("~/Content/site.css"))
    @Html.CssTag(Url.Content("~/Content/less/site.less.css"))
    @Html.CssTag(Url.Content("~/Scripts/Syntax/styles/shCore.css"))
    @Html.CssTag(Url.Content("~/Scripts/Syntax/styles/shThemeDefault.css"))

    @( Html.Telerik().StyleSheetRegistrar().DefaultGroup(group => group
        .DefaultPath("~/Content/Telerik")
        .Add("telerik.common.css")
        .Add("telerik.Black.min.css"))
    )
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/chrome-frame/1/CFInstall.min.js"></script>
    <script type="text/javascript">
        function path() {
            var args = arguments,
            result = [];
            for (var i = 0; i < args.length; i++)
                result.push(args[i].replace('^', '/Scripts/Syntax/scripts/'));
            return result 
        };

        $(document).ready(function () {
            openid.init('openid_identifier');
            SyntaxHighlighter.autoloader.apply(null,
                path('applescript            ^shBrushAppleScript.js',
                    'actionscript3 as3      ^shBrushAS3.js',
                    'bash shell             ^shBrushBash.js',
                    'coldfusion cf          ^shBrushColdFusion.js',
                    'cpp c                  ^shBrushCpp.js',
                    'c# c-sharp csharp      ^shBrushCSharp.js',
                    'css                    ^shBrushCss.js',
                    'delphi pascal          ^shBrushDelphi.js',
                    'diff patch pas         ^shBrushDiff.js',
                    'erl erlang             ^shBrushErlang.js',
                    'groovy                 ^shBrushGroovy.js',
                    'java                   ^shBrushJava.js',
                    'jfx javafx             ^shBrushJavaFX.js',
                    'js jscript javascript  ^shBrushJScript.js',
                    'perl pl                ^shBrushPerl.js',
                    'php                    ^shBrushPhp.js',
                    'text plain             ^shBrushPlain.js',
                    'py python              ^shBrushPython.js',
                    'ruby rails ror rb      ^shBrushRuby.js',
                    'sass scss              ^shBrushSass.js',
                    'scala                  ^shBrushScala.js',
                    'sql                    ^shBrushSql.js',
                    'vb vbnet               ^shBrushVb.js',
                    'xml xhtml xslt html    ^shBrushXml.js')); 
              SyntaxHighlighter.all();
        });
    </script>
    @RenderSection("SpecificPageHeadStuff", false)
</head>
<body>
    <div id="header">
    </div>
    <div id="main-wrapper">
        @*<img id="logo" src="../../Content/Images/Logo.png" alt="logo" />*@
        <img id="logoFiles" src="../../Content/Images/files.png" alt="files" />
        <div id="securityLocation">
            <ul class="loginMenu">
                <li>@Html.Partial("_LogOnPartial")</li>
                @if (User.Identity.IsAuthenticated)
                {
                    <li><a class="settingsMenu" href="/Team">Team Settings</a></li>
                    if (Session["IsOpenIdLoggedInUser"] != null && (bool)Session["IsOpenIdLoggedInUser"] == false)
                    {
                        <li><a class="settingsMenu" href="/Account/ChangePassword">Change Password</a></li>
                    }
                    <li><a class="settingsMenu" href="/Settings">Settings</a></li>
                }
            </ul>
        </div>
        <div id="main">
            <div class="topMenu">
                <ul class="headerMenu">
                    <li><a class="homeMenu" href="/Home/Index">Home</a></li>
                    <li><a class="actionMenu" href="/Search/CreateSearch">Search</a></li>
                    <li><a class="actionMenu" href="/CodeSnippet">Add Snippet</a></li>
                    <li><a class="actionMenu" href="/CodeSnippet/OpenFromWeb">Open From Web</a></li>
                    <li><a href="/Home/HowToUse">Getting Started</a></li>
                </ul>
            </div>
            <div id="mainbar">
                @RenderBody()
            </div>
            <div id="sidebar">
                @*                <div class="gadget">
                    <h3>
                        Help</h3>
                    <div class="clr">
                    </div>
                    <ul class="sb_menu">
                        <li><a href="/Home/HowToUse">Getting Started</a></li>
                        <li><a href="/Home/Plugins">CodeStash Plugin(s)</a></li>
                    </ul>
                </div>
                <div class="gadget">
                    <h3>
                        Settings</h3>
                    <div class="clr">
                    </div>
                    <ul class="sb_menu">
                        <li>@Html.Partial("_LogOnPartial")</li>
                        <li><a href="/Team">Team Settings</a></li>
                        @if (Session["IsOpenIdLoggedInUser"] != null && (bool)Session["IsOpenIdLoggedInUser"] == false)
                        {
                            <li><a href="/Account/ChangePassword">Change Password</a></li>
                        }
                        <li><a href="/Settings">Change Settings</a></li>
                    </ul>
                </div>
                <div class="gadget">
                    <h3>
                        Actions</h3>
                    <div class="clr">
                    </div>
                    <ul class="sb_menu">
                        <li><a href="/Search/CreateSearch">Search</a></li>
                        <li><a href="/CodeSnippet">Add Code Snippet</a></li>
                        <li><a href="/CodeSnippet/OpenFromWeb">Open From Web</a></li>
                    </ul>
                </div>
*@ @Html.Partial("_TagCloudPartial")
            </div>
            <div class="clr">
            </div>
        </div>
    </div>
</body>
@(Html.Telerik().ScriptRegistrar()
            .Globalization(true)
            .jQuery(false).DefaultGroup(group => group
                .DefaultPath("~/Scripts/Telerik")
                .Add("telerik.common.min.js")
                .Add("telerik.grid.min.js")
                .Add("telerik.textbox.min.js")
                .Add("telerik.calendar.min.js")
                .Add("telerik.datepicker.min.js")
                .Add("telerik.grid.filtering.min.js"))
    )
</html>
